﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using gnet1.Models;

namespace gnet1.Controllers
{
    public class GamesController : Controller
    {
        //
        // GET: /Games/
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult PushButtonGame()
        {
            var model = new PushButtonGameViewModel();
            return View(model);
        }

        [HttpPost]
        public ActionResult PushButtonGame(PushButtonGameViewModel model)
        {
          //model.IncrementPushCounter();
          model.GetCounter(model.Name, model.Email);
          return View(model);
        }
 
        [HttpPost]
        public PartialViewResult _PushButton(PushButtonGameViewModel model)
        {
         // model.IncrementPushCounter();
          model.GetCounter(model.Name, model.Email);
          return PartialView(model);
        }
    }
}
